home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows Expert
/
Windows Expert.iso
/
communic
/
twntlkdm.zip
/
TWINDOC.PRE
< prev
next >
Wrap
Text File
|
1990-05-23
|
134KB
|
4,158 lines
TWinTalk WINDOWS USER'S GUIDE
Version 2.0
╔═╦═╗ ╗ ╔ ╔═╦═╗ ╔╗ ╔ ╔═╦═╗ ╔═══╗ ╗ ╗ ╔═ ╔═══╗ ╔═══╗
╚ ║ ╝ ║ ║ ║ ║ ║║ ║ ╚ ║ ╝ ╠═══╣ ║ ╠══╩╗ ╔═══╝ ║ ║
║ ║ ║ ║ ║ ║║ ║ ║ ║ ║ ║ ║ ║ ║ ╔╗ ║ ║
╩ ╚═╩═╝ ╚═╩═╝ ╝╚══╝ ╩ ╝ ╚ ╩═══╝ ╝ ╚ ╚═══╝ ╚╝ ╚═══╝
(Preliminary release for TWinTalk 2.0 - USA Demo version)
Asynchronous Communications Software
for IBM (R) personal computers and compatibles
J.M. COHEN & O. PICCIOTTO
ENGLISH Version Distributed by:
TWinTalk International
P.O. Box 452
New Hartford, CT 06057
voice: 1-203-379-7727
data : 1-203-738-0306 or 738-1046 8-N-1
========================================================================
COPYRIGHT NOTICE
TWinTalk Copyright (c) 1987, 1988, and 1989 by
J.M. COHEN & O. PICCIOTTO
This document is Copyright (c) 1989 by TWinTalk International
No parts of TWinTalk or this document may be copied in part or in
whole, except as provided in the License in the following pages.
Disclaimer
TWinTalk International hereby disclaims all warranties relating
to this software, whether express or implied, including without
limitation any implied warranties of merchantability or fitness
for a particular purpose. TWinTalk International will not be
liable for any special, incidental, consequential, indirect or
similar damages due to loss of data or any other reason, even if
TWinTalk International or an agent of TWinTalk International has
been advised of the possibility of such damages. In no event
shall TWinTalk International's liability for any damages ever
exceed the price paid for the license to use software, regardless
of the form of the claim. The person using the software bears
all risk as to the quality and performance of the software.
Trademarks
TWinTalk is a trademark of J.M. Cohen and O. Picciotto
Many product names found throughout this manual are trademarks of
various companies.
LICENSE
TWinTalk Copyright (c) 1987, 1988, and 1989 by J.M. COHEN & O. PICCIOTTO
TWinTalk is not, nor has ever been, public domain or free software.
TWinTalk is distributed only as a commercial product. This BBS
DEMO version is available to try out the product. Non- registered
users of TWinTalk are granted a limited license to use the
TWinTalk DEMO version, of which this is a copy, for a trial
period, in order to determine if it suits their needs. All
functions of the commercial program are fully implemented.
However, you are limited to only 10 minutes of on-line connect
time for each session. Any other use of TWinTalk or use past this
period requires registration.
A registered copy of TWinTalk must be treated like a book, in that the
same registered copy of TWinTalk may not be used in more than one com-
puter at the same time.
All users are granted a limited license to copy this TWinTalk DEMO
only for the purpose of allowing others to try it, subject to the
above restrictions as well as these:
TWinTalk must be distributed in absolutely unmodified form, in-
cluding ALL program, documentation, and other files.
TWinTalk may not be included with any other product for any reason
whatsoever without a license from TWinTalk International.
No charge or payment may be levied or accepted for TWinTalk.
Bulletin Board system operators may post TWinTalk on their BBS for
downloading by their users without written permission only if the
above conditions are met, and only if no special fee is necessary to
access the TWinTalk files (a general fee to access the BBS is ok).
Distributors of User Supported and Public Domain software MUST ob-
tain written permission before distributing TWinTalk and
must follow the above conditions. Permission is almost always
granted; this requirement is necessary to ensure protection for our-
selves and TWinTalk users from unscrupulous individuals.
========================================================================
Table of Contents
Chapter 1 : INTRODUCTION
1.1 Welcome
1.2 Concerning MS-Windows
1.3 The TWinTalk WINDOWS package
1.4 Required Configuration
Chapter 2: INSTALLATION
2.1 Installation of Windows
2.2 Installation of TWinTalk WINDOWS
Chapter 3 : User Orientation
3.1 Begin the session.
3.2 Creating a new phonebook entry.
3.3 Dialing from the phonebook.
3.4 The Keyboard option
3.5 The Call Log.
3.6 Using the electronic phonebook
3.7 The COLOR option
3.8 The Copy command
3.9 Ending a session
Chapter 4: A Test Drive
4.1 Reading a recorded file
4.2 Recording a session.
4.3 Printing the screen.
4.4 Using the scrapbook
4.5 Using the list of entrys.
4.6 The Dial command
4.7 Ending a communication
4.8 Working with a direct connection
4.9 The WINDOWS Utilities
4.10 Configuring your terminal.
4.11 File Transfer Protocols.
4.12.1 Description of the Protocols
4.12.2 Transfering a file
4.12.3 KERMIT Protocol
4.12.4 YMODEM and YMODEM BATCH Protocols.
4.13 Script Commands
Chapter 5: Menu and Command Summary
5.1 The File menu
5.2 The EDIT menu
5.3 The COMMANDS menu
5.4 The OPTIONS menu
5.5 The TERMINAL menu
5.6 The PROGRAM menu
5.7 The DEBUG menu
5.8 The command line parameters
5.9 Use of COM3 and COM4.
Chapter 6: The Script Language
6.1 Preliminaries
6.1.1 The Numbers
6.1.2 The Identifiers
6.1.3 Constant Strings
6.1.4 Comments
6.2 Script Programs
6.2.1 Defining constants
6.2.2 Definition of types
6.2.3 Declaration of Variables
6.2.4 Declaration of procedures and functions
6.2.5 Instructions
6.2.6 Range of a declaration
6.2.7 The Supervisor and User Modes
6.3 Data types
6.3.1 Standard Scalar Types
6.3.2 The Interval type ('..')
6.3.3 The Array type (Tables)
6.3.4 The Record(Structured) type
6.3.5 Type Compatibility
6.3.6 Assignment Compatibility
6.4 Instructions
6.4.1 Assignment Instructions (':=')
6.4.2 Instruction Block
6.4.3 Iterative instructions
6.4.4 Conditional Instructions
6.5 Procedures and Instructions
6.5.1 Procedures
6.5.2 Functions
6.6 Input Output
6.6.1 Keyboard Input (Read)
6.6.2 Screen Output (Write)
6.7 Procedures
6.8 Functions.
6.9 Constants
6.10 Compilation Error Messages
6.11 Interpreter Error Messages
Appendix: TWinTalk WINDOWS Keyboard Equivalents.
========================================================================
========================================================================
Page 1
Chapter 1 : INTRODUCTION
1.1 Welcome
TWinTalk WINDOWS is a program for asynchronous communication that runs in
the MS-Windows environment.
TWinTalk WINDOWS offers a multitude of functions, in an effort to provide the
best available Windows communication program. TWinTalk WINDOWS uses all the
power of MS-Windows graphics interface, to allow the user to quickly and
easily learn and use our product.
1.2 Concerning MS-Windows
Even though this guide tries to give you the most complete help possible
in the use of TWinTalk WINDOWS, we will assume that you are familiar with
MS-Windows. If this is not the case, refer when necessary to the
"MS-Windows User's Guide" that you received upon the purchase of that
software.
Page 2
1.3 The TWinTalk WINDOWS package
This package is composed of the following elements:
*The TWinTalk WINDOWS diskettes (readable by either 360Kbyte or 1.2Mbyte
drives).
*The TWinTalk WINDOWS USER'S GUIDE.
1.4 Required Configuration
To use TWinTalk WINDOWS you must have the following elements:
* a computer operating under the MS-DOS system with MS-Windows version
2.03 or above installed.
* at least 512kbyte of memory (we recommend 640kbyte in order to
execute several applications simultaneously).
* a graphics monitor control card (we recommand a resolution
better than 640 x 200, such as the EGA).
* a color or black and white graphics monitor.
* MS-DOS 3.0 or above.
* a means of communication, for example:
-an external modem ( Hayes compatible ).
-an internal card (Hayes compatible).
-a RS-232 cable connected to another computer.
-a 'connection' via 'COMBIOS' or "NETBIOS"
Page 3
To take full advantage of TWinTalk WINDOWS, we also recommend that you have:
* a mouse or other means of pointing.
* a hard disk.
* a graphics printer.
Page 4
Chapter 2: INSTALLATION
2.1 Installation of Windows
To use TWinTalk WINDOWS you should have installed Windows on your computer.
Begin this procedure by referring to the Windows User's Guide.
2.2 Installation of TWinTalk WINDOWS
The installation program (Install.exe) serves to transfer TWinTalk WINDOWS and
its work files onto your hard disk. Before beginning, check that you
have at least 600kbyte of free space on your hard disk.
At the DOS prompt:
- place the TWinTalk WINDOWS Application diskette in drive A, then type
A:INSTALL <CR>
- follow the instructions displayed on the screen.
Once installed, TWinTalk WINDOWS is ready to go.
If you are already somewhat familiar with communications between
computers, you may skip to Chapter 3 "User Orientation".
Page 5
In the rest of this guide, we will assume that you are equipped with
a mouse. If this is not the case, use the keyboard. You will find the
standard keyboard equivalents in the "Windows User's Guide" (Chapter 2)
and those specific to TWinTalk WINDOWS in Appendix B of this guide.
Page 6
Chapter 3 : User Orientation
This chapter will guide your first steps with TWinTalk WINDOWS.
In the present chapter you will learn:
* to start a work session with TWinTalk WINDOWS.
* to create or modify a phonebook entry.
* to configure your computer with the system to which
you will connect.
* to establish communication between you and the site.
* to use your computer as a terminal.
* to use the Keyboard, Clock, and Color options.
* to save the communication parameters.
* to end a work session.
Page 7
3.1 Begin the session.
Open the TWinTalk window after having run Windows ( go to the
directory where you have installed TWinTalk and type WIN); you obtain
the MS-DOS Executive display:
(GRAPHIC)
1. Select the file name "TWINTALK.EXE"
2. Click the button on the mouse twice in rapid succession
to run TWinTalk.
The screen displays TWinTalk's work window.
(GRAPHIC)
Page 8
3.2 Creating a new phonebook entry.
To avoid tedious configuration setup operations for each new connection,
TWinTalk lets you manage a list of the entries you have to connect
to. Thus, for each entry, you need only specify the configuration one
time. As an example we are going to add the HH Info-Net BBS to our phonebook.
book to our list.
-1. To access the list, choose the entry DIALING LIST in the COMMAND menu
(GRAPHIC)
-2. In the text area labelled FILE, type the name of the file in which
you will save the configuration that we are going to describe
(Hounds.cfg)
-3. In the text area labelled NUMBER, type the phone number that you
must dial (possibly preceeded by
an access prefix if you need one to dial out of a local switchboard, for
example( "9,").
Page 9
-4.
-5. in the Emulations list, choose ANSI
-6. in the Protocols list, choose NONE
-7. Click on CAPTURE
You will then see the configuration dialog window appear containing the
physical communication parameters (you may refer to Appendix A for a
detailed explanation).
(GRAPHIC)
-8. On the Port line, click COM1 if your communication equipment is on
the asynchronous port #1, or COM2 if it is on Port #2. Refer to the
documentation of your modem or communication card to find out for which
port it is configured.
-9. on the WORD SIZE line, click 8
-10. On the PARITY line, click NONE
Page 10
-11. Flow CONTROL: None
-12. in the PERIPHERAL list area select the name of your communication
equipment. If the name of the equipment you have is not on the list,
refer to Appendix C: "Modem equivalents"
-13. in the SPEED list area, choose 1200
-14. click CONFIRM
The dialing list window then reappears.
You have created a new entry in your list. Henceforth, to consult
the electronic phonebook you will not need to concern yourself with
adjusting all of these parameters.
-15. Click now on CONFIRM.
Page 11
3.3 Dialing from the phonebook.
Call the command DIAL from the COMMAND menu. TWinTalk will dial the
telephone number.
You are now back in TWinTalk's main window, and you see displayed the
phonebook's reception page.
3.4 The Keyboard option
Your computer is now emulating an ANSI terminal. To adapt your keyboard to
the VT102 terminal, TWinTalk offers this option to give you these features.
-1. Choose KEYBOARD from the OPTIONS menu.
(GRAPHIC)
Now, to use a key unique to a VT102 terminal, you need only click on its name
on the screen.
All the VT102 keys can be obtained by their keyboard equivalent; to
find out how to do this refer to Appendix B (keyboard equivalents).
Page 12
3.5 The Call Log.
To keep constant track of the time since you have made the connection
and the cost of the communication, use CLOCK ( chosen from the OPTIONS
menu).
TWinTalk asks you for the price of each billing unit and the duration of
a unit.
(GRAPHIC)
Click on OK
You will then see the clock appear.
It will only run while you are connected, which will let you know the
time and the price of your communication.
(GRAPHIC)
3.6 Using the electronic phonebook
(to be added)
Page 13
(GRAPHIC)
3.7 The COLOR option
(to be added) ********
Page 14
The COPY command
Like all Windows applications, TWinTalk has an EDIT menu, which
contains the COPY option.
This option permits you to copy all or part of the screen to the
scrapbook. We shall illustrate the copying of two types of information,
text and graphic.
The TEXT option
If you select this option from the EDIT menu, when you ask
TWinTalk to copy, it will transfer only the alphanumeric characters to
the scrapbook, without taking the graphics. These characters can be reused by
any other Windows software and can be edited just like any other text.
The GRAPHIC option
If you choose GRAPHIC in the EDIT menu, TWinTalk will copy to
the scrapbook everything which is on the screen (graphics included) as a
drawing.
Page 15
Partial Copy
If you ask for COPY without a prior selection, TWinTalk copies
the whole screen to the scrapbook.
In order to copy only a part of the screen, bring the pointer of
the mouse to the upper left of the area that you want to select, press
the left button on the mouse, and kep it pressed down while you drag
the pointer to the lower right corner of the desired area. When you let
go of the button, the area is selected.
If you don't have a mouse.
- to move the pointer, press simultaneously on the ALT key and
on one of the movement arrows.
- to make the selection, you must also press the space bar while
you are framing the area that you want to copy, and release it to end
the selection. The space bar replaces the button on the mouse.
After having selected an area on the screen ( which will appear framed
by a white line), choose COPY from the EDIT menu to copy the area in the
scrapbook.
You may now use the saved screen information in other applications
functioning under Windows.
Page 16
3.9 Ending a session
To end your session, as for any Windows application, choose
EXIT from the system menu. At this moment the window closes
itself. TWinTalk will ask you if it should record the current
configuration in the default configuration file. Answer YES so that
this configuration can be chosen automatically at the time of the
following communiction.
Note
the system menu is accessible by clicking in the box at the left
of the title bar.
Page 17
Chapter 4: A Test Drive
In this chapter you will learn the basic functions of TWinTalk. These
are those that you will most often use.
If you are looking for the description of a command that is not
discussed in this chapter, refer to the following chapter "Menu and Command
Summary."
Page 18
4.1 Reading a recorded file
The "READ" command of the "FILE" menu allows you to review
or "play back" a file that you have previously recorded. When you
call this command, TWinTalk displays the following dialog window:
(GRAPHIC)
In the text area you see "*.TTY", which implies that the list area
located underneath is displaying all the files whose name ends with
the extension ".TTY".
In the other list you see all the directories contained within the
current directory and the disk drives available in the system.
TWinTalk uses the following standard extensions for the names of the
recorded files:
.TTY for all normal terminals
.MNT for recorded Minitel files
.PRS for recorded Prestel files
Enter in the text area the name of the file that you would like to
read or else select it directly from the list. To open the file, press
the "ENTER" key, or double
click directly on the file name in which you are interested.
Page 19
This procedure causes the READ CONTROL window to appear:
(GRAPHIC)
You can move either forward or backwards in the file:
Either by moving the box laterally in the horizontal bar with the
help of the mouse, or by giving a page number ion the text area.
At any moment you can interrupt the display by choosing the "PAUSE"
option. To restart the display click again in the same area.
To completely stop reading the file, close the READ CONTROL window.
Page 20
4.3 Recording a session.
The "CAPTURE" command in the "FILE" menu lets you record at any
moment everything which the screen displays in order to review it later.
Before or after you have connected to another computer, when you choose
the CAPTURE command from the FILE menu, you will see a dialog box appear
that will let you specify the filename where TWinTalk should record the
screen images.
(GRAPHIC)
Click on "CAPTURE" when you have specified the name of the file in which
you shall capture all that happens on the screen. By convention, the
names of the files recorded have the following extensions:
.TTY for all normal sessions
.MNT for Videotex sessions
.PRS for Prestel sessions
TWinTalk automatically offers you the extension by reason of the
emulation mode you are in.
How to know if you are actually recording?
During the recording, the CAPTURE command of the FILE menu is checked.
Moreover, if you have checked the STATUS option in the OPTIONS menu, you
will see the 'RECD' indicator displayed.
Page 21
How to stop recording?
You need only again call the "CAPTURE" command. The checkmark disappears.
The recording is ended.
Page 22
4.4 Printing the screen
The PRINT command in the FILE menu
This command permits you to print the entire contents of
TWinTalk's screen window (even if you only see a part of it). Calling
this command makes the printing dialog box appear:
(GRAPHIC)
The Text option allows you to print only the screen's alphanumeric
characters, excluding all graphics. This option's advantage is its
speed.
The graphic option allows you to print everything which is on the
screen, including drawings. The resolution of the graphics is always
automatically adjusted to the type of printer selected by the use of
the program "CONTROL.EXE". In this case the printout will take longer,
especially Laser printouts.
The INVERSE option (usable only for graphics) allows you to print in
black that which appears in white on the screen, and vice-versa. This
option's purpose is to save the print ribbon or, for laser printers,
their toner.
Page 23
Approving the printout (Click on "CONFIRM") causes the appearance of the
window:
(GRAPHIC)
You can thus see the number of the page being processed. In the case of
laser printers in graphics mode, a page number can appear several times
in succession.
Page 24
4.5 Using the scrapbook
The commands: COPY, PASTE, TEXT, and GRAPHICS of the EDIT menu.
TWinTalk allows you to exchange data with all other Windows applications
using the scrapbook as an intermediary.
TWinTalk can exchange two types of information:
-text
-a color or black and white graphic bitmap
To choose between these two possibilities, check respectively Text or
Image in the EDIT menu. When copying graphics, the status of the COLOR
option in the OPTIONS menu determines if a color or black and white
bitmap is exchanged.
Selection of the information to be copied is accomplished with the mouse
by pointing at the upper left corner of the area to be selected,
depressing the left button of the mouse, and, while keping the button
depressed, moving the mouse toward the lower right corner of the area
and finally releasing the button.
Note: if you don't have a mouse
-to move the cursor, simultaneously press the ALT key and one of
the movement arrows.
-in making the selection the space bar replaces the button on
the mouse; kep it depressed while you outline the area to be
copied, and release it to end the selection.
Page 25
The COPY command puts the contents of the area you have selected in the
scrapbook. If you haven't selected anything, everything on the TWinTalk
window screen is placed in the scrapbook (including the checked parts).
If the scrapbook contains text, coming from TWinTalk or from any other
application, the PASTE command of the EDIT menu is activated. By calling
it, you send the contents of the scrapbook to the computer to which you
are connected exactly as if you typed the text by hand.
Page 26
4.6 Using the list of sites
The DIALING LIST command of the COMMAND menu.
In chapter 3 "User Orientation" we have seen that TWinTalk
uses a dialing list in order to facilitate the adjustment of the
parameters to be used for a connection.
To use the list, call the DIALING LIST command from the COMMAND menu.
You will see the dialing list dialog box displayed.
(GRAPHIC)
Several operations can be performed at this moment:
1-Loading a site's parameters and connecting to it
2-Loading a site's parameters without any connection
3-Dialing a telephone number without loading any dialing parameters
4-Adding a site and its parameters to the list.
Page 27
1-Loading dialing parameters and connection
In the dialing list (at the lower left), choose the name of the site to
which you would like to connect. Double click on the name of the site of
your choice:
If your modem knows how to dial a telephone number by itself (Hayes
type), you will see the dialing control window appear.
(GRAPHIC)
You can at this moment CANCEL the connection attempt or FORCE it. The
latter option establishes a logic connection to the modem even if the
carrier has not been recognized. You can equally well use the slide
bar to increase the waiting time of the carrier.
If the cursor reaches the left end of the slide bar, TWinTalk has not
recognized the carrier : it hangs up and frees the line.
If your modem does not know how to dial, you will see the following
dialog box displayed:
(GRAPHIC)
Pickup the handset of your telephone, dial the access number of the
desired site and click the "OK" button.
When you hear a high pitched tone in the earphone, rock the switch on
the modem that controls the phoneline and hang up. You are then
connected to the site and can begin to work.
Page 28
2- Loading the parameters of a site without making a connection
In the dialing list click ONE time on the name of the desired site. You can
equally well enter the name of the site in the text box labelled "FILE".
This action displays the values of the NUMBER, PROCEDURE,
EMULATION, and PROTOCOL parameters for the given site.
Click on CONFIRM, the dialog window closes and TWinTalk is now
configured for the site but you have not been connected. The connection
can be made by using the DIAL command from the COMMAND menu.
3- Dial a number without loading any parameters
This operation facilitates the dialing of a telephone number if it
hasn't been recorded as one of the dialing parameters.
-Fill in the "NUMBER" field with the number to be dialed. If you have a
telephone switchboard, enter the external access digit, then a comma,
and finally the desired number. For example,
0,2037380306 0 being the digit for outside access
-Click on DIAL. The dialog window disappears and a connection is
attempted using the current parameters. The control of the
connection is accomplished as described above.
Page 29
4- Add or modify a site and its parameters in the list
To add a site:
1 - Enter in the "FILE" field the name of the site that you are
going to add. This name will have by default the extension '.CFG'
2 - Enter in the "NUMBER" field the telephone number to dial to
establish a connection with the site. The number is entered
as explained above.
3 - Check the "BELL" box if you are connecting to a server that
uses American standards, click "Touch tone"
if your telephone system supports that mode, and check
"take the line" if you want the modem to establish the
connection after dialing (this box will be checked in the
majority of cases).
4 - Enter in the "Procedure" field the procedure which should be
followed after the dialing parameters are loaded. If there isn't
any procedure which should
be run, leave the field empty. The procedure file will be
searched for by default in the configuration directory. If you
prefer you may specify another directory explicitly.
5 - Select from the emulation list the entry appropriate to the site.
Refer to the section "Configuring your terminal" for
more information about emulations.
6 - Select from the file transfer list the entry appropriate to the
site. Refer to the section "File transfer protocols" for more
information about protocols.
7 - Click on CAPTURE. The line configuration dialog box then appears.
Page 30
(GRAPHIC)
Set up all the parameters for the communication after referring
to the section "Everything you need to know about asynchronous
communications" then click on CONFIRM : the line configuration
dialog box closes and you find the new site in the dialing list.
8 - At this point you can load the parameters of the new site and
connect yourself as explained above.
Modifying the parameters of a site:
1 - Select the desired site by clicking ONE time on its name in the
dialing list.
2 - Modify the field entries, the emulation types and the file
transfer protocols, then click on CAPTURE to open the line
configuration dialog box.
3 - Modify the line configuration via its dialog box and click
CONFIRM.
4 - At this point you can load the parameters of the new site and
connect yourself as explained above.
Page 31
4.7 The Dial command
This command allows you to redial the last telephone number called
without having to use the dialing list.
It is very handy when the number is often busy and you must redial
several times.
4.8 Ending a communication
The DISCONNECT command from the COMMAND menu.
When you have finished working with the remote site, to end the
communication, activate the DISCONNECT command from the COMMAND menu.
You will then hang up and free the telephone line.
Page 32
4.9 Working with a direct connection
The TALK TO MODEM and DISCONNECT command from the COMMAND menu.
When you would like to join two computers located in the same
building, if they are sufficiently close together, you need not use a
modem. You need only connect them by cable. This will be the
configuration most often used to connect PC's to mini-computers.
Thus there isn't any telephone number to dial.
To connect to the other computer, first choose the site from the
list (see the section 'using the dialing list'), and click the
CONFIRM button.
Thus, in order to be able to work with the other computer, you need only
use the TALK TO MODEM command from the menu.
At the end of the session, use the DISCONNECT command to get back to
local mode.
Page 33
4.10 The Windows Utilities
The KEYBOARD, COLOR, ARRANGE, and CLOCK commands from the OPTION menu.
The KEYBOARD command
Some terminals have special keys which don't exist on PC keyboards. For
example, the VT-1xx terminals use the PF1, PF2, PF3, and PF4.
To add these special keys to your own keyboard, use the KEYBOARD command
from the OPTIONS menu. You will see displayed a keyboard window showing
the special keys of the terminal you are working with.
For the VT102 and VT52 emulations:
(GRAPHIC)
Page 34
(GRAPHIC)
To simulate a special key stroke, click it in the keyboard window.
The COLOR command
If your version of Windows is configured to work in color, this command
is selected by default.
When COLOR is selected, TWinTalk displays the text and images in
the colors transmited by the other computer; thus the text is always
well defined.
When COLOR is not selected, Freewat substitutes a grey pattern
for the range of colors. This lets owners of monochrome systems use
the same services designed for color monitors, but this mode alters the
readability of the text.
If your version of Windows is configured for a black and white monitor,
the COLOR command is de-selected by default. TWinTalk then uses a
display of patterns. When COLOR is selected, TWinTalk tries to avoid
displaying all the text in patterns of maximum contrast, so that
their visibility is improved.
Page 35
The CLOCK command
This command allows you to know the price of the communication in
progress at each moment. When you call the CLOCK command from the OPTION
menu, the following dialog box appears.
(GRAPHIC)
Indicate the price parameters:
-price per billing unit
-duration of the billing unit
Finally, click the OK button.
As soon as you are connected, and until you are disconnected, TWinTalk
will calculate without interruption the price of the communication by
displaying the window:
(GRAPHIC)
The ARRANGE command
Calling this command causes the Videotex display window to be refreshed
in order to have the best visibility possible. This command is only
effective for videotex emulations.
Page 36
4.11 Configuring your terminal
The commands in the TERMINAL menu.
To manage the display of the terminals to which they are connected,
computers use cursor positioning sequences, the total or partial erasure
of the screen, the displacement of areas of the screen, etc...
The various terminal manufacturers have developed competing products
which are not mutually compatible : they don't use the same sequences
for the same action.
In order to permit you to use the largest number of computers possible,
TWinTalk knows how to imitate the behavior of several different
terminals. (we are refering to emulation).
When you connect to a computer, you must indicate what type of terminal it
should imitate so that the display on your screen is correct.
Exercise 2: Emulation Utilities
This exercise will permit us to learn what happens when TWinTalk
emulates a terminal which is not appropriate for the remote computer.
- Open the TERMINAL menu and choose TELETYPE.
- Verify that you are disconnected (if the DISCONNECT command in
the COMMAND menu in not shaded, call it).
- Put the diskette in drive A.
- The the READ command from the FILE menu.
Page 37
- Choose the file PHONEBOOK.MNT in drive A; click OK.
The screen displays an incoherent succession of characters which have
nothing to do with the greeting page of the electronic phonebook. You
now understand the need to choose a terminal adapted to the computer
with which you are working.
Close the file reading window and restart the exercise by choosing
Videotex instead of Teletype from the TERMINAL menu.
This time the display is correct.
In conclusion, if you happen to be receiving a screen display where the
messages are not making sense, it is perhaps the case that you haven't
chosen the corect terminal emulation.
How to know which terminal emulation to use?
TWinTalk offers eight different emulations that that be separated into
two groups:
- the professional terminals: TTY, VT52, VT102, VT220, D2000 and
Telecomputing.
- the mass market terminals. These are Videotex and Prestel.
The mass market terminals are devices developed by the French
(with Videotex) or British (with Prestal) telecommunication
administrations.
Each time that you call up the electronic phonebook or a minitel server
on 3613, 3614, 3615, or 3616, choose the Videotex emulation. The same
types of service exist in Great Britain where it is necessary to
choose Prestal.
Page 38
The professional terminals are forseen for working with mini or
mainframe computers. The most widespread model is ANSI; if this
emulation does not give you a correct display, contact the system
manager of the site you are connecting to and ask which emulation you
should use.
Here is a resume of the characteristics of the terminals emulated by
TWinTalk.
Teletype
- The simplest of terminals, it possesses no higher level commands
and behaves like a line printer.
Videotex
- A semi-graphics terminal using French Telecommunication
standards. Known as well by the name Minitel.
Telecomputing
- The 80 column telecomputing mode of the Minitel 1B. Recognizes
ANSI commands. Partially VT102 compatible. TWinTalk will change
automatically to this mode from Videotex mode if the server commands
it.
VT52
- An alphanumeric terminal created by Digital Equipment
Corporation.
VT102
- An alphanumeric terminal possessing semi-graphic characteristics
and a large size. Created by Digital.
Note: VT102 is very similar to ANSI terminals
~~~ ADD VT220 and any other special emulations....
Page 39
ANSI
- Terminal corresponding to the American National Standards
Institute standards, partially VT102 compatible.
Note: The command IBM STANDARD gives access to a set of IBM-PC
compatible semi-graphic characteristics.
D2000
- Intertechnic's alphanumeric terminal.
The IBM Standard or French Standard commands
For ANSI emulation the IBM Standard command allows you to tell TWinTalk
that it should use the set of characteristics specific to the IBM-PC
instead of the standard ANSI set (the set used by WINDOWS).
Indeed, some computers will assume that you are using an IBM type
terminal. This generally translates into a display of miniscule letters
instead of the horizontal and vertical bars used to draw outlines.
If you notice such a phenomenom, call the command "IBM Standard" from
the TERMINAL menu.
In the VT102 and VT52 emulation modes the French Standard command
informs TWinTalk that it should use a standard of French
characteristics.
Page 40
4.12 File Transfer Protocols
TWinTalk allows you to send and recieve files to and from another computer.
Instead of displaying the information coming from the other computer on your
screen, TWinTalk saves them in a file that you may later reuse.
4.12.1 Description of the Protocols
What is a transfer protocol?
A file transfer protocol is a set of rules and procedures which permit
two computers to exchange files while limiting the risk of transmission
error or a loss of information.
Which protocol should be used?
Since it is necessary that both the computers use the same protocol,
the first choice criteria is that a protocol be available on the other
computer.
Start, therefore, by finding out which protocols are understood by the
other computer. Keep those which are also known to TWinTalk:
.PDIP
.KERMIT
.XMODEM
.XMODEM 1K
.XMODEM CRC
.YMODEM
.YMODEM BATCH
Since the primary role of a protocol is to gaurantee the integrity of
the transfer, choose the one that offers the most security (in the
above list they are classified in order of increasing security).
~~~ Add this:
TWinTalk also may be used with up to 2 optional external protocol drivers
for use with ZMODEM, YMODEM-G, CLINK, BIMODEM, etc., by use of the
following statement in your WIN.INI file:
PROT1=protocol.pif
PROT2=protocol.pif
Page 41
Finally, consider the efficiency of the protocol (the amount of useful
information transmitted relative to the total ), and the supplementary
functions offered by the protocol. For this, consult the following list.
Protocol: None
.Efficiency: 100%
.Mode of control: none
.Supplementary functions: none
.Size of the dataway: 7 bits for ASCII text files,
8 bits for other files
.Remarks: use as a last resort
Protocol: PDIP
.Efficiency: 40%
.Mode of control: by sum parity check
.Supplementary functions: transmit the file name
.Size of the dataway: 7 bits for ASCII text files,
.Remarks: established for the French
Accounting Office
Protocol: KERMIT
.Efficiency: variable, about 60%
.Mode of control: bit sum parity check or,
optionally, by a redundant
cyclical code
.Supplementary functions: transmit the file name,
possibility of chaining
transmissions, command language
for the remote computer
.Size of the dataway: 7 or 8 bits
.Remarks: a classic computing standard.
The passkey. Read the chapter
devoted to it.
Page 42
Protocol: XMODEM
.Efficiency: 75%
.Mode of control: bit sum parity check
.Supplementary functions: none
.Size of the dataway: 8 bits
.Remarks: the most developed protocol in
micro-computing
Protocol: XMODEM.1K
.Efficiency: 92%
.Mode of control: by redundant cyclical code
.Supplementary functions: none
.Size of the dataway: 8 bits
.Remarks: Improves the efficiency of
XMODEM on a good line. Security
assured by redundant cylcical
code
Protocol: XMODEM.CRC
.Efficiency: 73%
.Mode of control: bit sum parity check
.Supplementary functions: none
.Size of the dataway: 8 bits
.Remarks: good error detection
Protocol: YMODEM
.Efficiency: 90%
.Mode of control: by redundant cyclical code
.Supplementary functions: transmit file name, allows
you to chain transmissions
.Size of the dataway: 8 bits
.Remarks: still not well developed
Page 43
Some precautions to take....
-If you are connected via a network, find out the size of the dataway
(for the PAD Transpac by default: 7 bits) and choose an appropriate
protocol.
-Do not use XON/XOFF for flow control with 8 bit protocols (XMODEM and
YMODEM families)
-If you are using a minitel as a modem, never use XON/XOFF nor the 8 bit
protocols.
Page 44
4.12.2 Transfering a file
The TRANSFER command in the FILE menu.
Calling this command makes the file transfer control window appear:
(GRAPHIC)
This window has its own menu bar, a list window with slide bar, a
command line, and several numeric indicators. It also indicates the
current directory for the file transfers.
In the following, all the actions performed on a menu concern the menu
of the file transfer control window.
Two operational modes are possible for the transfers, the ASSISTED mode
and the EXPERT mode. In these two modes, it is convenient to choose the
file transfer protocol using the PROTOCOL menu. Your choice will depend
on the considerations expressed above.
Page 45
The TRACE menu in this window offers four levels of monitoring for
analyzing the file transfer process. Monitoring messages appear in the
emulation window if one chooses a level above 0 (This option is
generally used only by specialists).
ASSISTED mode:
In this mode all actions are performed thru the COMMAND menu
and the choice of files is accomplished with a dialog box. The actions
differ slightly according to the protocol being used.
XMODEM, XMODE.1K, XMODEM.CRC, PDIP Protocols:
The SEND command in the COMMAND menu causes a dialog box to
appear where the user can choose the file to send. Once the
choice is made, the transfer automatically begins.
The RECEIVE command in the COMMAND menu displays a dialog area
which permits the user to specify the name under
which the file will be received.
Once the name is specified, the transfer automatically begins.
YMODEM and KERMIT protocols
In this case the 'SEND' and 'RECEIVE' commands display
respectively the key words 'SEND' and 'RECEIVE' in the command
line. The user can at this moment adjoin the file concerned,
and then press ENTER to begin the transfer, or else he can start
without specifying a file name. In this latter case a dialog box
appears where the user can choose the name of the file.
Page 46
For the KERMIT protocol, the supplementary commands are added to
the 'COMMAND' menu. Calling one of these commands will cause the
corresponding key word to be displayed in the command line. The
user should complete the command as needed, then run it.
Expert mode.
In this mode the user directly types the file transfer commands. The use
of 'wild cards' (generic file specification characters) is allowed. The
command format is:
keyword u:pathname\file
where 'u' represents a disk drive unit, 'pathname', the specification of
the directory (using the identical syntax as that of MSDOS) and 'file',
the name of the file concerned.
for example:
-send c:\*.DOC
Sends all the files with extension .DOC from the main directory
of the C disk
-send A:\TEST\A*.CFG
Sends all files whose names begin with the letter A, having the
extension CFG from the TEST directory of disk A
In the case of multiple file transfers, when SENDING, all the files to
be sent are displayed in the 'list of files to send'. Each time that a
file is sent, it is removed from the list. When RECEIVING, each file
received is added to the 'list of files received'.
Page 47
TWinTalk has two classes of protocols: those which transfer the names of
the files, like YMODEM or KERMIT, and those which don't transfer them,
like PDIP, XMODEM, XMODEM.CRC and XMODEM.1K.
To receive files with:
Protocols which transfer file names.
To receive the files in a given directory, type the command:
receive u:pathname\ or
receive u:pathname\* or yet
receive u:pathname\*.* then ENTER.
'u' represents the disk unit, 'pathname' the directory in which the file
or files will be saved.
To receive the files in the active directory (which is indicated in the
file transfer control window), type
receive then ENTER.
Protocols which do not transfer the filename.
In this case you must specify the filename. If it is omitted, a dialog
box appears to allow the user to specify the file.
Page 48
For example:
-receive C:\TEMP\TEST.TXT
receive a file and put in in the directory TEMP of
drive C under the name TEST.TXT and change the active
directory to C:\TEMP.
-receive MYFILE.DAT
receive a file and put it in the active directory of
drive C under the name MYFILE.DAT
Note:
In all cases the active directory is updated during
the file transfer. In the case when a file is sent, this change
is temporary; when a file is received, it is permanent. This
particularity can be used to change the active directory.
The transfer then begins...
You can follow its evolution via several means.
-the little figure appears to walk while there is an exchange of
information betwen the two computers. If you reduce its
equivalent icon, the icon will display the figure and you may
continue to monitor the progress of the transfer while still
working on another Windows application.
-the line "Number of blocks transmitted" indicates the number of
blocks of data exchanged (the size of the blocks vary according
to the protocol used).
-the line "% transmitted" tells you what fraction of the file
has already been transferred. If you are receiving a file the
line is labelled "Kbytes received" and its value indicated the
number of kilobytes received.
Page 49
-the line "Errors" indicates the number of errors detected
while sending a given block
-the line "repetitions" indicates the number of times that a
packet had to be retransmitted because of a bad reception.
-the line "accumulated erors" tells you the total number of
errors detected during the transfer.
If the three last lines show a high rate of errors, it is
probable that your telephone line is bad. If you can, try to
stop the communication and to call back the other computer.
If, from the beginning of the transfer, a large number of errors
appear while no blocks at all are transferred, you are without
doubt not using the same protocol as the remote computer.
To stop a transfer in progress, click on the STOP button or
close the window controlling the file transfer.
Page 50
4.12.3 The KERMIT Protocol
The KERMIT protocol was born at Columbia University in the USA. A public
domain product, it is today a true standard. Its major advantages are:
-The large number of different machines that use it.
-The possibility of changing to a 7 bit data transfer.
-The possibility that it offers of taking control of the remote
computer.
KERMIT offers a large selection of controls for regulating block size,
types of controls, etc... TWinTalk frees you from all setup commands for
the transfer by negotiating the transfer parameters with the remote
computer.
Therefore, you do not have direct access to these controls, but rest
assured, TWinTalk will automatically adapt itself to the other computer
provided that it is using the KERMIT standard.
The KERMIT commands
The CWD, DIR, DELETE, GET, TYPE, and COPY commands of the COMMAND menu
of the file transfer window.
KERMIT also lets you take control of the remote computer and to
issue some file management commands.
To do this, when you connect to the other computer and see the
KERMIT prompt on your emulation screen (Kermit>) type the
following command in the emulation window.
SERVER then the "ENTER" key.
Page 51
This command puts the remote computer in server mode. It is then ready
to execute your choice of the following commands:
- CWD: lets you change the server's active directory (equivalent
to the DOS command: ch Dir)
- DIR: lets you list the directory on the server
Complete syntax: DIR [name] [*][?]
("Wild cards" are allowed)
- DELETE: allows you to erase a file on the server.
Syntax: Delete Name (*) (?)
- GET: allows you to transfer one of the server's files to your
own computer.
Syntax: GET Name (*) (?)
The file named "Name" is searched for on the server and
then transfered to your own computer where it is placed
in the active directory with the same name.
Syntax: GET u:\pathname\name
The file named "Name" is searched for on the server and
then transferred to your own computer where it is palced
in the directory 'pathname' on drive 'u' with the same
name.
Page 52
- COPY: lets you copy one file to another.
Syntax: COPY Name (*) (?) Name2 (*) (?)
- BYE: leave server mode and disconnect (no parameters)
- FINISH: leave server mode (no parameters)
To use these commands, select a name from the COMMAND menu, which will
cause the corresponding password to be pasted in the command line.
Finish the line by using the keyboard to enter its parameters, then
press Enter.
You may also type in the entire command (password included).
We remind you finally that these commands affect the files located on
the remote computer and not on your own.
Note:
to send a file to a computer in server mode, it is only necessary to
select the SEND command and to choose the file to send with the help of
the techniques discussed above.
Page 53
4.12.4 The YMODEM protocol
This protocol is starting to become a standard for file transfers in the
world of PC's and compatibles. Its advantages are:
- good efficiency (>80%)
- possibility to send or receive several files
- good transfer security (control by Redundant Cyclic Code
RCC).
The YMODEM commands
Two commands are available for this protocol: SEND and RECEIVE.
These commands can be used in expert or assisted mode ase
described above.
To send several files, use "wild cards", for example:
SEND C:\TEST\*.DAT
Sends all the files on the TEST directory of the C disk.
Page 54
4.13 Script Commands
The LEARN, EXECUTE, TAKE, and IDENTIFY commands of the PROGRAM menu.
TWinTalk lets you create "procedures" or programs and then to use them
to execute a series of commands in your stead.
To illustrate the use of these programs, we are going to create a
program which automatically connects to the HH-Info-Net Bulletin Board.
The LEARN command
Here is the sequence to follow:
- Call the DIALING LIST command from the COMMAND menu.
- Choose the site "HH Info-Net BBS"
- Click the CONFIRM button.
- Select the Keyboard command from the OPTION menu.
- Call the LEARN command from the PROGRAM menu. TWinTalk
then asks you in a dialog box to supply the name that
you would like to give to this program. Type HHINFNET.TWK
then ENTER.
- Select the DIAL command from the COMMAND menu.
Page 55
- Wait until the welcome screen of the HH-Info-Net bbs is
displayed.
- Enter the requested logon information.
- Complete any routine tasks you wish added to the script.
- To end the learning process, call the LEARN command from
the PROGRAM menu so as to deselect it.
Its over. Without any complication, you have just created your
first TWinTalk program.
Henceforth, TWinTalk knows how to dial the phone number of
HH Info-Net, repeat the logon and other steps automatically.
And during this time you can do something else.
Life is simple, isn't it?
We'll check it right away...
The EXECUTE command.
- Select the EXECUTE command from the PROGRAM menu.
- In the dialog area, choose HHINFNET.TWK (which is the
program you've just created).
- Watch TWinTalk work.
Page 56
The execution window which has appeared on the screen permits the
programs to display messages or to collect data. To learn more, refer to
the chapter "TWinTalk reference manual".
These programs will permit you to automate your work sessions or
communications. In this way it is possible to automatically start the
execution of a program when loading in a site. You need only select the
site from the dialing list and to indicate in the "Procedure" text area the
name of the program to execute.
For example, call the DIALING LIST command, select the "Phonebook" site,
and type in the "procedure" text area the name: HHINFNET.TWK. Click CAPTURE
then, when the line configuration window appears, click CONFIRM.
Now, if you call the "phonebook" site, TWinTalk will automatically
execute the HHINFNET.TWK program.
Advanced Apprenticeship
When TWinTalk executes a program, it waits the same time as you
did before proceeding to the following action.
It is sometimes useful to synchronize your programs other than by
waiting. To do this there are two commands.
-The "CHAIN SCREEN" command waits for a text string that you
will give it at a precise area of the screen. To use it, while
you are creating a program (during the 'learning' process), use
the mouse to select a word or group of words on one line of the
screen, then call the "CHAIN SCREEN" command. Finally, go to the
next action that you would like to record.
Page 57
When TWinTalk executes your program, it will wait until it
identifies the same text, in the same place, before proceeding
to the following command. If the text appears elsewhere on the
screen, it will not be recognized.
- The CHAIN LINE command is used like CHAIN COMMAND, but the word
or group of words will be identified no matter where it appears
on the screen.
Page 58
Chapter 5: Menu and Command Summary
This chapter is directed especially at those having an advanced
knowledge of digital transmissions in particular and computing in
general.
They will find here an exhaustive description of the TWinTalk commands,
in technical terms.
The organization of this chapter corresponds to that of the menus in
TWinTalk's menu bar and to the commands in those menus.
Page 59
5.1 The File menu
The READ command
In this mode, the data flow no longer issues from the
communication line but from a file specified by the user.
The reading of this file is synchronized on the appearance of
characters emitted by the keys of the Videotex function (SEND,
NEXT, RETURN) for Videotex files.
The CAPTURE command
Duplicates the totality of activity occuring on the
communication line (emission and reception) in the indicated
file. This captured file will ultimately be reraed by the READ
command.
The TRANSFER command
Open the file transfer window (cf section: 'File transfers').
The SAVE AS.... command
Backup everything in the current configuration (with modified
communication line and TWinTalk parameters). See if needed the
description of configuration files.
The PRINT command
Print the entire screen (with a choice of text or
graphics), including the hidden parts if the window size has
been reduced.
Page 60
5.2 The EDIT menu
The COPY command
Puts the selected area in the scrapbook. If no area has been
selected, the entire screen is copied, including any hidden
parts.
If TEXT is active, only the alphanumeric characters are copied
with a conversion of character standards to the ANSI standard.
This assures that the VIDEOTEX and IBM STANDARD screen
enhancements are correctly copied.
If GRAPHICS is active, the 'Bit-Map' format will be put in the
scrapbook. A color bit-map will be copied if the COLOR option
from the OPTIONS menu is checked, otherwise a black and white
bit-map will be copied.
The PASTE command
Sends the alphanumeric and control characters contained in the
scrapbook to the communication line.
Note: In the case of a VIDEOTEX emulation, each line of text is
followed by characters which make up the function key 'NEXT'.
The NEXT key is the one conventionally used by all videotex
servers to change, in the case of a multi-line reception, from
one line to another.
In the case of other emulations, the CR followed by LF
characters are inserted after each line of text.
The TEXT command
Indicates that the COPY command should generate a Text type
scrapbook.
Page 61
The GRAPHICS command
Indicates that the COPY command should generate a bit-map type
scrapbook. Useable only with the Videotex and Prestel
emulations.
Page 62
5.3 The COMMANDS menu
The DIALING LIST command
Opens the dialing list window (cf section "Using the site agenda")
The DIAL command
Starts the dialing of the last telephone number selected. If the
modem does not dial, the dialog for manual dialing is invoked.
If the modem does autodial, the dialog for automatic
dialing offers the possibility of simulating the detection of
the carrier (signal 109 "Carrier Detection" (RSLD)) with the
FORCE button.
The TALK TO MODEM command
Logical opening of the line. Provokes the validation of the
signal "Data Terminal Ready" 108.2 (DTR)
The DISCONNECT command
Logical closing of the line and invalidation of the "Data
Terminal Ready" signal 108.2 (DTR)
The BREAK command
Places the communication line (Signal 103) in "Break" status,
that is in the low state for 750 ms.
Page 63
The AUTOMATIC command
When this option is checked, its permits one to automatically
chain the dialing, the carrier detection, and the connection. When it is
not checked, (called IDENTIFY), it is then possible for the user to
make a modem connection with the TALK TO MODEM command, then to correspond
with the modem via the HAYES commands...
Refer to the technical documentation of the modem for the HAYES
commands.
For example:
You are calling a correspondent to whom you would like to send a file.
You decide on the protocol to use and on the line parameters; it then
suffices that one of you types ATD <CR> to take the line, that the other
type ATA <CR> to have his modem respond, and the two modems will connect
themselves together. The transfer can then be executed...
The IDENTIFY command
Lets you identify the communication equipment. Those recognized are:
- the different minitels
- external Hayes compatible modems
- Hayes compatible modem cards
Page 64
5.4 The OPTIONS menu
The COMMUNICATIONS command
Accesses the dialog for the serial line configuration. The parameters
are the following:
- Port: indicates the exit port to which the communication
equipment is connected. Refer to Appendix C "Gadgets and Tricks"
for the use of the COM3 and COM4 ports.
- Word Size: size of the data words exchanged in bits (not
counting stop bits or parity bits)
- Parity: each word can be completed with a parity bit computed as
follows:
*even: so as to make the number of 1 bits even
*odd : so as to make the number of 1 bits odd
*marked: the parity bit is always 1
*space: the parity bit is always 0
*none: no parity bit is sent
- Stop bits: the number of bits sent after each character to reset
the receiver in wait state.
- Control: indicates the mode of flow control
* XON/XOFF : the characters DC1 and DC3 are used to tell the
remote computer that it should suspend or restart its
transmission.
Note: This type of control cannot be used with the XMODEM.xxx
and YMODEM protocols.
Page 65
* Equipment: the physical signals 105, 106 (CTS and RTS) and 107
108.2 (DSR and DTR) serve as dialog for flow regulation.
*None: no flow control
- Duplex: indicates the possibility of simultaneous data flow in
both directions.
*Full: simultaneous communication in both directions. This mode
implies that the echo of a typed character must be done by the
remote machine.
*Half: communication in one direction alternated with
the other. This mode implies that the echo of a typed character
must be done locally by your machine.
Note: If for each typed character you see two characters on your
screen, you are undoubtedly in Half Duplex mode on a Full Duplex
line. In the same way, if you have no echo at all, you are
without doubt in Full Duplex mode on a Half Duplex line.
- Mode: allows you to tell the modem on which frequencies it
should emit and on which frequencies it should receive.
*To call a central server, choose "CALL".
*To communicate with another microcomputer, choose the mode
inverse to that of the other system.
Note: The RESPONSE mode equally serves to generate an
echo for the remote machine. To do this, this mode automatically
selects the Half Duplex mode.
+
Page 66
- Return: indicates the characters used to substitute for a
received CR (ODH):
*CR + LF: CR is replaced by CR and LF (OD,OA)pe
*CR : CR is kept as it is
*removed: the CR character is eliminated when received
- Jump: indicates the treatment of the LF character (OAh):
*CR + LF: a received LF is replaced by CR and LF (OD,OA)
*LF : the LF character is kept as it is.
*removed: the LF character is eliminated when received
- Character Wait: indicates the minimum delay between two
consecutive characters during emission. You may either indicate
a time in milliseconds in the text area, or select AUTO : the
software will adjust itself automatically.
- Line Wait: indicates the minimum delay between lines (separated
by CR or LF) during emission, as for the character wait.
- Peripherals: this list area contains the names of the different
communication equipment managed by TWinTalk . The choice:
LOCAL indicates the connection of two computers by intermediary
cable to eliminate any modem or of a PC as a terminal for a
minicomputer.
Page 67
HAYES indicates that a standard HAYES modem is being used; this
peripheral without doubt cannot manage asymmetric
communications.
NonHAYES indicates a non-dialing modem.
All the other choices are for specific modem cards
- SPEED: indicates the baud rate for data exchange. In the case of
asymmetric exchanges (different transmission and reception
speeds), the first number is the reception speed.
The KEYBOARD command
Opens the keyboard window containing the specific keys of the
selected terminal.
Note: By clicking the keyboard window button, you activate
this window and deactivate the main window. If you would
like to type characters in the main window, reactivate
it by clicking one time above it.
Page 68
The COLOR command
If you have a color monitor and graphics card (EGA or VGA),
COLOR will transform the 8 available colors to 8 shades of grey.
If you have a monochrome graphics configuration, you will be in
the grey mode by default, and COLOR will put TWinTalk in a mode
of maximum contrast which will enhance that text not always easy
to read with certain shades of grey.
Moreover, this option determines the type of bit-map (Color or
not) to copy into the scrapbook.
The ARRANGE command
ARRANGE brings back, when it is possible and necessary, the
emulation window in its original place and size. This command is
only usable in Videotex and Prestel modes because these are the
only two emulations which authorize the displacement of the
display window.
The CLOCK command
Allows one to specify the billing parameters of the
communication and to open the clock window. This window will
only be displayed at the time of logical connection to the modem
and will only start the accounting of the connection when the
carrier is detected.
The VERTICAL SCROLLBAR command
Allows one to make the vertical control bar of the current
emulation window disappear. This action permits the display of
more characters on one line and is very useful for the 132
column mode of the VT102. The users of VGA video cards can
have access to this mode in order to see 80 characters per line.
Page 69
The INK/PAPER command
Allows you to change the color of the screen character display.
The term INK refers to the color of the characters themselves,
PAPER refers to the background color. This command makes the
following dialog box appear:
(GRAPHIC)
With the mouse click in the box showing the color of your choice
for the ink and the paper and confirm.
With a keyboard, use the TAB key to move the cursor from field
to field, the LEFT and RIGHT arrows to move the cursor from
color to color, and type SPACE to select the chosen color.
Confirm with the ENTER key.
The STATUS LINE command
Allows you to view certain information at the bottom of the
window in a status line.
The first field contains help information for each
menu. This line of text is updated each time you choose
an option from a TWinTalk menu.
Page 70
The second field contains the following information:
- The current cursor position on the emulated terminal :
Lxxx: Cxxx
- The message "AUTO" if TWinTalk is in Automatic mode
- The message "CAPT" if TWinTalk is in capture mode
(cf "The CAPTURE command")
- The message "APPR" if TWinTalk is in its learning mode
This command acts like a toggle, the act of reselecting it
eliminates the status line.
The SETUP VT/ANSI command.
Allows you to specify certain parameters for the VT102 and ANSI
emulations. This command makes the following dialog box appear:
(GRAPHIC)
- Click the option '132 columns' to have 132 columns on a
VT102 or ANSI.
Page 71
- Click the 'Reverse screen' option to invert the colors
of the VT102 or ANSI screens.
- Click the 'Auto linefeed' option to have the emulator
change to a new line automatically at column 80 or 132.
- Click the 'CR->CR/LF' option to have the emulator
perform the following actions:
*Send LF after CR when you press the RETURN key
*Add CR after receiving a LF character.
- Click the 'Configure Keyboard' option to use the
keyboard defined by the user instead of the standard
VT102 keyboard.
- Click the 'Application Mode Arrows' option to put
the arrows on a VT102 keyboard in application mode
(sending <ESC>Ox instead of <ESC>[x)
- Click the 'BS sends DEL' option so that the BS key (in
general labelled by a left arrow '<---') sends DEL
character code 127. In this case, simultaneously
pressing the SHIFT and BS keys will send the BS
character code 08.
Input the upper and lower margins for the VT102 emulators.
These margins determine the part of the VT102 screen subject to
vertical scroll.
Page 72
The Setup Keyboard command
Permits the user to configure certain function keys for his
convenience. This command causes a dialog box to appear which
suggests for each configurable key the character sequence before
being sent. Only eight keys are simultaneously displayed; to see
and define other keys, click the 'NEXT>>' or '<<PRECEEDING'
buttons.
(GRAPHIC)
The sequence sent when a configurable key is pressed is input
just as it is. Enter control characters in the form : <xx>
where xx is the hexadecimal character code.
For example the input <1B>[2J will produce the
sequence ESC [2J when the key is pressed. To input the space
character replace it by <20>. To input the character '<' replace
it by <60>.
In the case of a syntax error, (an imbalance of brackets, for
example) clicking the 'OK', 'NEXT>>' or '<<PRECEEDING' buttons
will cause the message 'Syntax Error' to be displayed with the
concerned lines in reverse video.
Note: Attention, all the sequences defined in this menu are
used only if the Keyboard Configured option is chosen
in the Setup VT/ANSI dialog box.
Page 73
5.5 The TERMINAL menu
Allows you to choose a terminal emulation to use among:
.TTY
.PRESTEL
.VIDEOTEX
.VT52
.VT102
.VT220
.TELETEL
.ANSI
.D2000
The IBM Standard command
For the TTY, VT52, VT102, and ANSI emulations, this command
allows the use of the IBM character set instead of the standard
ASCII set. This set is particularly well suited for semi-graphic
drawings.
The OEM CHAR SET command
This command replaces the IBM STANDARD command in the TERMINAL
menu when emulating the VT102. It means that TWinTalk should
substitute the 7 bit French standard for the US standard. This
command is needed in order to be able to produce accented
characters in the VT102 emulation.
Page 74
5.6 The PROGRAM menu
The LEARN command
Allows for the automatic generation of a TWinTalk program. Refer
to the section "The TWinTalk Programs" in chapter 4 for more
information.
The EDIT command
Loads the application NOTEPAD.EXE without leaving TWinTalk.
Allows you to modify a TWinTalk program.
Note:The NOTEPAD.EXE application is used by default. The editor
of your choice may be used instead by placing the fillowing line
in the file WIN.INI under the heading [TWinTalk]
EDIT=u:\pathname\editor.exe
Where 'editor.exe' is the name of the editor that you are going
to use, 'pathname' the directory where it can be found, and 'u'
the disk drive unit.
Page 75
The EXECUTE command
Starts the loading and execution of a TWinTalk program. A dialog
box appears where the name of the file to be executed is
specified. Once the name is chosen, the execution window is
displayed:
(GRAPHIC)
The TWinTalk programs display information in the upper window,
while data can be entered in the lower window.
Note: Various programs can control the appearance of this
window, which is why for some programs the window doesn't appear
at execution time.
~~~~This whole area from here on needs some work
- commands are no longer entirely valid, but serve as a
reference only ---LW 11/2/89
The SHOW command
Allows you to display the TWinTalk execution window, so that the
result of the execution may be seen or to terminate the
execution. The window is hidden by default. This command is
'learned' if TWinTalk is in learning mode.
The HIDE command
Allows you to hide the TWinTalk execution window. This command
can be useful for freeing up space on the screen. This command
is 'learned' when TWinTalk is in learning mode.
Page 76
The CHAIN SCREEN command
In learning mode, it allows you to synchronize the
execution of the next TWinTalk command with the appearance on
the screen of a given text string at a given position.
This text and its position is indicated by selecting them using
the mouse before calling the CHAIN SCREEN command.
The CHAIN LINE command
In the same manner as the IDENTIFY command, it allows you to
synchronize upon the reception of a text string, but this time
independently of its position on the screen.
The text to be waited for is indicated by a selection with the
mouse before calling the CHAIN LINE command.
Page 77
5.7 The DEBUG menu
Allows you to view the non displayable characters sent and received. The
different commands of this menu correspond to different modes of
viewing.
- None: invisible characters are not displayed, but are
eventually interpreted as command sequences from the
terminal.
- Hexadecimal: all the characters are replaced by their
hexadecimal ASCII code between brackets. For example,
the hexadecimal ASCII character code OD will be seen as:
[OD].
- Characters: the characters formed using the "Control"
key are displayed in the form : [^M], for example, for
the combination 'Control' and 'M'. Other characters are
displayed normally.
- ASCII: the special characters in the ASCII character set
are visualized by their names in this code. For
example, the hexadecimal character code OD will be seen
as (CR).
Page 78
5.8 The command line parameters
TWinTalk can be run directly from DOS without having first run
WINDOWS. TWinTalk will take care of this responsibility....
To accomplish this you must have defined a search path for the
directory where WINDOWS is installed, for example:
PATH=C:\WINDOWS
TWinTalk will look for WIN.COM, WIN86.COM, and
WIN386.EXE, in succession, and run the first one found.
The name of a site can be specified in the command line.
TWinTalk will start up with the configuration of that site.
If a procedure has been defined for that site, it also will be
automatically run. For example:
TWinTalk PHONEBOOK.CFG
will run WINDOWS then TWinTalk with the PHONEBOOK.CFG site
configuration. If no site is specified, TWinTalk will use the
configuration TWinTalk.CFG. (currently annuaire.cfg) ~
~ twintalk.cfg should be the default - not annuair
Page 79
5.9 Use of COM3 and COM4.
On PC's and compatibles the communication ports COMn are defined by two
parameters:
- The input/output address
- The number of the interrupt line used
For example COM1 is defined by:
- Address 2F8h
- Interrupt 4
While the COM1 and COM2 ports have standard addresses and interrupt
line numbers, that is not the case for the COM3 and COM4 ports.
Each manufacturer of modem or communication cards has defined specific
addresses for his product.
TWinTalk allows you to use the COM3 and COM4 ports by redirecting the
COM2 port to one of them. It will therefore not be possible to
simultaneously use both COM2 and COM3 or both COM2 and COM4.
-------the following port addresses have ben changed to the de facto US
standard for 3&4 ------LW 11/3/89
TWinTalk knows the addresses of the non-standard ports by reading the
absolute memory address 0:404h for COM3 and 0:406h for COM4. These
values should be initialized by the user before running TWinTalk.
Interrupt line No. 3 will always be used for COM3 and COM4.
For example, if your card can be configured in COM3 at address 02FEh,
enter (using the DOS Debug facility for example):
- In 0:404h FEh
- In 0:405h 02h
Page 80
We advise you to construct a command file of the following type:
in setcom.bat:
echo off
debug < setcom.dat > nul
in setcom.dat:
e 0:404
FE02
q
This command file runs the debug utility by taking the commands from the
file setcom.dat and redirecting the display to the nul peripheral.
Page 81
Chapter 6: The Script Language - See also Twintalk.new for revisions
TWinTalk has a high level PASCAL command language. You can, using
specific commands, run TWinTalk just as you do from the keyboard.
This chapter is addressed to users who would like to completely use all
of TWinTalk's programming possibilities. Those who don't wish to jump
into its programming may refer to the section "The TWinTalk programs"
in chapter 4.
Language definition
The Script language is very similar to Standard Pascal but nonetheless
with the following exceptions:
1)The types FILE, REAL, STRING, SET OF are not implemented.
2)The following commands are not implemented:
RESET, REWRITE, CLOSE, FORWARD, GET, GOTO, MARK, RELEASE, PUT
3) These supplementary keywords have been added to the language:
a)Constants
FALSE, TRUE, LINE, SCREEN, ESCAPE, RETURN, HOME, END,
TAB, HELP, LEFT, RIGHT, UP, DOWN, DELETE, BACK, PRIOR,
NEXT, ADD, SUBTRACT, DECIMAL, MULTIPLY, F1 to F16, NUM0
to NUM9.
b)Functions
CONNECTED, FIND, TAKEN.
Page 83
c)Procedures
CLS, DIAL, SEND, WAIT, CONNECT, DISCONNECT, EXIT,
CAPTURE, STOPCAPTURE, TEXT, GRAPHIC, INITTAKE, TRANSFER,
CONFIG, COPY, HIDE, SHOW
6.1 Preliminaries
The alphabet is composed of letters, numbers, and special
symbols. The program lines are constructed from this alphabet while
following the syntax. It does not distinguish between
upper and lower case letters except in character strings and in
comments.
The special characters and keywords that are used are as follows:
+ - / * = <> < >
<= >= := ( ) [ ] {
}. , : ..
And Array Begin Case Const Div Do Downto
Else End For Function If Mod Not Of
Or Packed Procedure Program Record Repeat
Then To Type Until Var While
6.1.1 The Numbers
TWinPas only recognizes signed whole numbers between -32768 and 32767
6.1.2 The Identifiers
Identifiers in TWinPas are names which represent memory locations. They
are composed of a letter followed by one or several digits or letters.
Page 84
Examples:
a
CurrentChar
x2000
VeryVeryLongName
Identifiers may be arbitrarily long but are truncated to 16
characters by TWinPas. Remember that reserved words may not be used as
identifiers.
6.1.3 Constant Strings
In TWinPas a character string constant is composed of a sequence of
characters delimited by apostrophes.
Examples:
'This is a constant'
'ABCDEF'
6.1.4 Comments
Comments are arbitrary sequences of characters on an arbitrary number of
lines delimited by the symbols (* and *).
Examples:
(*This is a comment
without much
interest on
several lines*)
Page 85
6.2 TWinPas Programs
Each TWinPas program is composed of a header and a program body.
The header allows for parameter declaration.
The program is composed of blocks which are themselves composed of a
header and a body.
The body of the block contains the execution instructions.
6.2.1 Defining constants
Defining constants allows you to associate a name with a
constant. Constant identifiers allow you to make a program more
readable.
Example:
Const MAXLEN=80;
NB_iterations=100;
These declarations are also very useful for constants which can change
their value in time due to later modifications.
6.2.2 Definition of types
In TWinPas data types can be described in the type declaration area or
referenced when the variables are declared.
Page 86
6.2.3 Declaration of Variables
Examples:
Var a,b: Integer;
c: Char;
d: Array[1..10] OfChar;
The type may be a standard type, a type description, or a type
identifier. All TWinPas variables should be defined by variable
declarations except if they are predefined.
A variable should not be declared twice at the same level of
declaration.
Var x: Integer;
x: Char;
This declaration is illegal.
6.2.4 Declaration of procedures and functions
This subject is developed in section 6.5
6.2.5 Instructions
Instructions are described in section 6.4
6.2.6 Range of a declaration
In TWinPas all declarations have a certain range. The range of a
variable declaration (that is, the possibility to refer to the variable)
is all of that block in which it has been defined as well as all
subsidiary blocks except those where the variable is redefined.
Page 87
Example:
Procedure a (b:Integer;c:Integer);
(* beginning of the range of a, b, and c *)
Var d:Char; (* beginning of the range of d *)
Procedure b;
(* Hole in the range of integer b *)
Var d:Char;
(* Hole in the range of the least nested variable d *)
Begin (* Body of procedure b *)
.
.
End; (* Procedure b and the most nested variable d
end their range here *)
(* the integer b and the least nested variable d are
again recognized here *)
Begin (* Body of procedure a *)
.
.
End;
(* b,c,d are now out of their ranges *)
6.2.7 The Supervisor and User Modes
TWinTalk is a program which offers multiple functions. However, all of these
functions are not used by all users. To simplify the command interface so as
not to confuse novice users, two working modes are available:
- Supervisor mode: This mode allows the user the use of all the
functions without restriction.
- User mode: This mode suppresses some commands from the
menu so as to make the user interface
simpler. All of the options used to
configure communications are suppressed so
that a novice user cannot accidently modify
the parameters.
How to change to User mode and vice-versa?
TWinTalk's configuration files (*.cfg) contain the following password:
Access=
A value of 0 permits supervisor access. A value of 1 permits user access.
Change the value of this password using an editor (notepad.exe) to change from
one mode to another.
This password is only read for the startup configuration of the program. If
you later choose another site from the list, the access mode will not change.
It is then advisable to change the file TWinTalk.cfg.
6.3 Data types
In TWinPas data types may be very structured and complex, but all are
constructed from simple (non-structured) types. A non structured data
type is either a type defined by the programmer or one of the three
standard scalar types.
6.3.1 Standard Scalar Types
The three predefined scalar types are Integer, Boolean, and Char
(Character).
Page 88
6.3.1.1 The Integer Type
An Integer type value is a whole number whose value is limited by the
system used. In TWinPas an integer is composed of two octets, which
implies a value in the interval -32768 to 32767.
The arithmetic operators which have integer operands and which return
integers as results are:
+ Addition
- Subtraction
* Multiplication
Div Integer Division
Mod Modulo (remainder after division)
Example:
8 Div 3 = 2
8 Mod 5 = 3
5 - 9 = -4
The + and - operators can be used to indicate the sign of an operand.
Examples:
-negative
+2453
Several TWinPas functions are applicable to integers. These functions
are described in detail in Chapter 7.
Some functionsoperate on integers as well as on the other non-structured
types presented next:
Page 89
6.3.1.2 The Real Type
This type is not implemented in TWinPas.
6.3.1.3 The Boolean Type
A Boolean value is one of the logical values True or False. True and
False are two values prefefined such that:
Pred(True) =False
Succ(False)=True
6.3.1.4 The Character Type
A character type value is an element of the ANSI character set. The ANSI
character set is composed of the ASCII character set represented by the
values 0 to 127, and an extended character set of values from 128 to
255.
A Chr type value is an integer value ordered according to the ANSI set.
Examples:
Succ('A')='B'
Pred('0')='/'
The Ord function makes a correspondence between the set of characters
and the non-negative integers. These integers vary between 0 and 255.
The Chr function makes the correspondance between the non-negative
integers and their equivalent character in the ANSI set.
Page 90
Examples:
Ord('0')=48
Ord('1')=49 etc...
Chr(48)='0'
Chr(Ord('0'))='0'
6.3.2 The Interval type ('..')
The interval type is not defined in TWinPas as such; nevertheless you
may use it when declaring tables. (cf 6.3.3)
6.3.3 The Array type (Tables)
A table is composed of a fixed number of elements of the same type,
called the basic type. Each element of the table is accessible by an
index. The basic type can be anything, but the index type must be
ordinal.
Examples:
Var Table : Array [1..8] Of Integer;
Letters : Array [1..10] Of Array [1..5] Of Char;
The indices should be chosen from the interval -32767 to 32767. They can
however be composite expressions.
Page 91
Example:
Letters[index Mod 8][3]:=chr(index+ord('A'));
The keyword Packed that one can find in front of the words Array or
Record in some PASCAL programs is recognized but has no effect on these
tables or structures.
Multi-dimensioned tables may be declared in a more compact manner.
Reconsidering the example of the table Letters declared on page 90, one
may instead substitute:
Letters:Array[1..10,1..5] Of Char;
Accessing the elements of a multi-dimensional array is similar to that
for a uni-dimensional array. The table Letters may be managed in the
following manner:
Letters[3,4]:='V';
Letters[3][4]:='V';
Carac:=Letters[5,1];
Letters[1,1]:=Letters[10][5]; etc...
6.3.4 The Record(Structured) type
It is possible to regroup data of different types within one structure.
A Record is a structure with a fixed number of elements. As opposed to
tables, its elements do not have to be of the same type.
Page 92
Example:
Type Server = Record
Parity : Char;
Size : Integer;
Speed : Integer;
End;
Var Bbs : Server;
Bbs can then be initialized as follows:
Bbs.Parity:='P';
Bbs.Size :=7;
Bbs.Speed :=75;
As for tables, the keyword Packed may be used but produces no effect.
6.3.5 Type Compatibility
TWinPas is like PASCAL, a language where the data type is very
important. Two types are compatible if:
* they are identical.
* one is a subset of the other
* the two are subsets of a third
Page 93
6.3.6 Assignment Compatibility
The value of an expression Expv of type Expt is compatible with a
variable, a parameter, or an function identifier of type Fcti if:
*FctI and Expt are of the same type and if neither is a
structured type
*Fcti and Expt or Ordinal types and Expv is in the value
interval possible for Fcti.
6.4 Instructions
The Instruction part of a program defines the actions to be performed in
a sequential manner.
The Instructions part of a TWinPas program are deliminated by:
Begin
...(* Instructions*)
End;
6.4.1 Assignment Instructions (':=')
The assignment instruction is used to give a particular value to a
variable.
Variable;=expression;
Page 94
6.4.1.1 Expressions
An expression is composed of constant or variable operands, operators,
and function calls. (Functions are described in 6...). An expression is
a rule for calculating a value where the rules of operator precedence
and arithmetic evaluation (from left to right) are applied. The priority
of operators is given here in increasing order. Operators with the same
priority are on the same line:
= <> < > <= >=
+ - Or
*/ Div Mod And
Not
An expression between parentheses is evaluated in a manner independent
of the preceeding and following operators.
Examples:
2*8+4*2 =(2*8)+(4*2) =24
Not a And b =(Not a) And b
4*8/2 =(4*8)/2 =16
6+8 Div 4 =^+(8 Div 4) =8
An assignment can be made on any variable of any type. But, the type of
the variable and the type of the expression should be compatible.
Examples:
A:=3+4*8;
Charac:=3; (* is illegal if Charac is of type Char *)
Page 95
6.4.2 Instruction Block
An instruction block is a sequence of instructions executed in the order
in which they are written. The sequence is delimited by the words Begin
and End. The instruction part of a program is an Instruction Block.
Example:
Begin
A:=3;
B:=5;
C:=A+B;
End
Note: It isn't necessary to put a semicolon after the instruction which
preceeds the End statement because a semicolon is an instruction
separator and not part of the instruction itself.
6.4.3 Iterative Instructions
Iterative instructions are among the most important of a language. They
allow for the repetitive execution of a group of instructions (Block)
until an end condition is satisfied which interrupts the process.
6.4.3.1 While Instruction
While expression Do instruction
The type of the expression should be Boolean. The expression is first
evaluated, then, if the result is True, the instruction executed.
This process is repeated until the expression becomes False. In this
case, the expression is not executed.
Page 96
Example:
While x<y Do x:f(x)+1;
While (a<>'') And (Counter<>10) Do
Begin
Read(a);
Counter:=Counter+1;
End;
If the expression is initially false, the instruction or the block is
never executed.
6.4.3.2 Repeat Instruction
Repeat instructions Until expression
The Repeat instruction is similar in effect to the While instruction,
but the instructions are executed before the calculation of the control
expression. The type of this expression is again Boolean. The
instructions are repeated until the expression becomes true. As the
instructions are executed first, they are therefore executed at least
one time.
Examples:
Repeat a:=f(a)+1 until a>b;
Repeat
Count:=Count+1;
Read(c)
Until c='';
Page 97
6.4.3.3 For Instruction
For variable := initial expression Do/DownTo final expression Do
instructions
The variable type should be ordinal and the expressions of the same type
as the variable. The variable should be declared in the deepest nested
block containing the loop.
At the beginning of the For instruction, an ititial value is
assigned to the control variable. At each iteration, the value of this
variable is incremented (or decremented in the case of DownTo) until its
value is higher ( or lower ) than the value of the final expression. The
initial and final expressions are evaluated only once at the beginning
of the loop.
If the final expression is less than the initial expression (or greater
than in the case of DownTo), the instruction block is not executed at
all. At the end of the loop, the control variable is undefined, and no
assumption of its value may be made.
No test on the assignment of the control variable's value is made in
the loop, moreover such a test is not advised.
Examples:
For i:=1 To Do Write(i*i);
For day:=Monday To Friday Do
Begin
ReadLn(HoursWorked);
TotalHours:=TotalHours+HoursWorked
End
For x: Max DownTo Min Do ReadLn(a[x]);
Page 98
6.4.4 Conditional Instructions
It is often necessary to make the execution of an instruction or a block
of instructions dependent upon a condition. Several possibilities are
offered to this end, the If instruction and the Case instruction.
6.4.4.1 The If Instruction
This instruction can be used in two different ways:
a) If expression Then Instruction
b) If expression Then Instruction1 Else Instruction2
In both cases the expression type is Boolean. If the value of the
expression is True, the instruction following Then is executed. If the
expression is evaluated as False in case (a) the execution goes on to
the instruction following the If and in case (b) to the instruction
following the Else.
Examples:
If a<b Then a:=b;
If x+y=z Then
Begin
x:=0;
y:=0;
End
Else
z:=0;
Page 99
An If instruction bracketed in the form:
If expression1 Then If expression2 Then Stat1 Else Stat2
can be difficult to understand. In TWinPas, it could be written:
If Expression1 Then
Begin
If Expression2 Then
Instruction1
Else
Instruction2
End;
An Else is associated with the closest If. There is never a semicolon
before an Else, and a semicolon placed after a Then indicates the null
instruction.
6.4.4.2 The Case Instruction
The Case instruction is composed of an expression (the selector) and of
a list of constant arguments of the same type as the selector which
should be an ordinal.
Case expression Of
Label1:expression
.
.
.
End
The instruction selected is that whose argument is equal to the current
value of the selector. If no value corresponds to that of the selector,
an error message is generated...
Page 100
Examples:
Case i Of
0:x=:0;
1:x:=i;
2:x:=i*i;
3:x:=i*i*i;
4:x:=i*i*i*i;
End;
Case Carac Of
If, cr:newline:=True;
'a','b','c','d':letter:=True;
'0','1','2','3':digit :=True;
End;
The selection arguments in a Case statement should be unique and should
only appear one time in the instruction.
6.5 Procedures and Instructions
TWinPas, like most developed languages, allows one to define a group of
actions as a procedure to which a name, called the procedure identifier,
is given. The procedure is activated by a procedure instruction which
begins the execution of the group of instructions defined in the body of
the procedure.
The use of procedures allows the partitioning of a program into small
pieces, corresponding to small tasks to be performed, determined at the
time of the construction of the program. The program is then easier to
reread and to maintain. Procedures also allow you to define one time
only a module of code which can be called from several places in the
program, which reduces input and economizes memory usage.
Page 101
In section 6.2 we have said that a block was composed of a declarative
header and of a body which is itself composed of instructions and that
in the declarative part the procedures or functions are also defined.
Functions will be discussed in section 6.5.2.
6.5.1 Procedures
The header of a procedure is composed of the word Procedure followed by
a name identifying the procedure and of a list of optional parameters.
The parameters will be explained further on in this chapter. After the
header we find the block. A block, as we have described for the program
block, is composed of a declarative part and a part of instructions. All
the variables declared in the block of a procedure are local to the
procedure and are not accessible outside of it. Since the declarative
part of a procedure can also contain procedure declarations, the range
of a procedure identifier is identical to that of any other variable
identifier.
A procedure is activated by a procedure instruction which is composed of
the name of the procedure and a parameter list, if there is one.
Example:
Procedure ReadWrite;
Const LongName = 30;
Var i : Integer;
Begin
For i:=1 To LongName Do
Begin
Read(Carac);
Write(Carac);
End;
End;
Page 102
To activate this procedure, we could write:
ReadWrite;
6.5.1.1 Parameters
It is often necessary to define new variables to represent procedure
arguments and results. These variables are called parameters and are
defined in the header by a dummy parameter list. This list indicates
the name of each parameter followed by its type. When a procedure having
parameters is called, the instruction to execute the procedure should
specify the name of the procedure as well as the corresponding parameter
list. The class of each parameter depends on that of the dummy parameter
in the procedure definition. In TWin Step, there are two types of
parameters, parameters passed by value and parameters passed by
address.
Parameters passed by value can be considered as entry characters,
because their sole role is to give initial values to the instructions of
the procedure. The parameter may be an arbitrary expression which is
assigned in a manner compatible with the dummy parameter. When a
procedure is called with its parameters set by value, the values are
assigned to the dummy
parameters and even if the value of the dummy parameter changes during
the execution of the procedure, the change has no effect on the original
parameter.
Parameters passed by their address are used when the value of the
parameter must be changed in the procedure and saved outside of it. Each
parameter should be a variable of the same type as that of the
corresponding dummy list. A parameter passed by address is characterized
in the dummy list by being preceeded by the word Var.
Page 103
When the dummy parameter list is written, the following rules must be
obeyed:
a) The number of parameters in the two lists should be
identical.
b) Each passed parameter should correspond to the dummy
parameter occupying the same place in the dummy list of the
procedure.
c) The parameters must obey the rules described below for
parameters passed by value and by address.
Examples:
Procedure Max(Var m:Integer;x,y:Integer);
Begin
If x>y Then m:=x
Else m:=y;
End;
(* The calls following the procedure Max are legal *)
Max(Table[a],8,16);
Max(MaxVal,8*3,12-6);
Max(UpperPtr,a,b); (* a and b are Integers *)
(* The calls following the procedure Max are illegal *)
Max(8,16,20); (* the 1st parameter should be a variable *)
Max(MaxVal,8,'v'); (* the third parameter is not of the correct
type *)
A procedure may call itself, or call a second procedure which in turn
calls it. This type of procedure is recursive.
Page 104
6.5.1.2 Late Declarations
In TWinPas, procedures and functions must have been defined before
there name can be used. The keyword Forward doesn't exist in TWinPas.
6.5.2 Functions
A function is a particular type of procedure which describes a
calculation and which produces a single vale as a result. The result
should be a scalar. While a procedure is called via a procedure
instruction, a function is activated when its name is used in an
expression; the result of the function returns the final value to the
expression.
A function declaration is similar to a procedure declaration, but it is
necessary to specify the type of the result after the list of dummy
parameters.
Example:
Function Max(x,y:Integer) : Integer;
The function identifier is used in the body of the function to record
the result of the calculation. In the body of the function one must
at least assign a value, of the defined type, to the function
identifier. If this does not occur, the result of the function
will be indeterminate.
Page 105
Example:
Function Max(x,y:Integer):Integer;
Begin
If x>y Then Max := Else Max :=y
End;
The body of the function, like that of a procedure, is a block and can
also contain other variable, procedure, and function declarations. The
transmission of parameters is managed according to the same rules as
those for procedures.
Even though in the body of a function its identifier is equivalenced to
a variable, any other attempt to use the function identifier as an
ordinary variable will result in a recursive call to said function.
If the function modifies the contents of a variable external to the
function, we have what is called a side effect. You should pay close
attention to side effects. Indeed, if a function Fct(x) modifies a
variable a, the result Fct(x)+a will be different than a+Fct(x), which
should not be allowed to happen...
6.6 Input Output
All programs use data and we must be able to furnish data to this
program by one means or another. In TWinPas, data may come from the
keyboard or from the communication line.
Page 106
6.6.1 Keyboard Input (Read)
The Read command is used in the following manner:
Read(variable_1,variable_2,...variable_n);
These variables should be of either type Integer or Char (character).
The effect of the Read command is to assign to each of the variables
of the list, a value read from the input stream (the keyboard).
If the variable type is Integer, a character sequence representing an
integer is read. Leading blanks and trailing characters
are ignored. All numbers read should be separated by spaces
or by trailing characters. If the variable type is character, the
character following the input stream is read and assigned to this
variable. If this character is the end of line marker, the standard
function Eoln(Input) becomes true. The keyword Input is optional. It
signifies that one is using the standard input mode.
A variant of the Read procedure allows one to ignore the end of the
input line. This instruction is:
ReadLn;
ReadLn can also read several parameters.
Read(v1,v2,v3); (* is equivalent to *)
Read(v1);Read(v2);Read(v3);
and
Read(v1,v2,v3); ReadLn; (* is equivalent to *)
ReadLn(v1,v2,v3);
It is only after the aquisition of the parameters that the remainder of
the input line is destroyed.
Page 107
Example:
Read(Integer1,Integer2,Charac1,Charac2);
with the following line of input:
1245 -143a 158 <CR>
is equivalent to:
Integer1:=1245; Integer2:=-143;Charac1:='a';Charac2:='1';
We would have obtained the same result with the following input
lines:
1245 <CR>
-143 <CR>
a158 <CR>
The final 58 of the input line is not lost as yet; it will be
read with the next Read. ReadLn on the other hand would have removed all
the end of the line after its execution and the 58 would have
disappeared.
6.6.2 Screen Output (Write)
he rite command is used in the following manner:
Write(variable_1,variable_2,...,variable_n);
The WriteLn command generates a line feed after its execution. In
TWinPas, the parameters may be integers, characters, or constant
character strings.
Page 108
Examples:
Write('FiveThousandThreeHundrenTwenty = ',5320);
will display FiveThousandThreeHundredTwenty = 5320
WriteLn('FirstPhase');
Write('A Word");
Write('WhichMeansNothing');
will display FirstPhrase
A WordWhichMeansNothing
It is also possible to format the display by specifying the size
of the print field.
Write(12345:10);
will display 12345 right oriented in a field of 10 characters
6.7 TWinTalk Procedures
You may refer to the SuptelPro program at the end of the chapter to
better understand the use of the procedures and functions specific to
TWinPas.
Cls Procedure;
Erase the screen of the execution window and return the
typing prompt to its upper left corner.
Hide Procedure;
Hides the execution window. The window is hidden by default.
Page 109
Show Procedure;
Show the execution window. It is sometimes useful to display the
execution window. Show is thus often the first instruction of a
program.
Text Procedure;
Signals TWinTalk that the scrapbook will be managed in Text
mode.
Graphic Procedure;
Signals TWinTalk that the scrapbook will be managed in Graphics
mode.
Config('FileName') Procedure;
This procedure allows you to configure TWinTalk based on the
contents of a configuration file whose name one has specified as
a parameter.
Connect Procedure;
Open the RS232 serial line. Calling this procedure is mandatory
before dialing a number or sending a file...The serial line is
no longer available to other applications.
Disconnect Procedure;
Close the serial line to TWinTalk. It is again free for other
applications.
Dial ('telephone number') Procedure;
Dial the phone number whose digits are given as a parameter.
Send (parameter list:Integer, Char, or Constant Array) Procedure;
Send the given parameters on the line. The syntax is identical
to that for Write.
Wait Procedure (Seconds:Integer);
Wait a number of seconds. This procedure permits a pause in the
running of a TWinPas program.
Page 110
Capture ('File Name',Source:Integer) Procedure;
Allows you to capture all the characters which pass on the
communication line in a file. After the capture, the resulting
file can be locally reviewed when desired...The source parameter
can be either Line or Screen which are two predefined constants.
In the case of Screen capture, when one calls the Copy
procedure, you may copy the contents of the screen to the
capture file.
Copy Procedure;
Transfers the contents of the screen to the current capture
file. The screen capture allows you to obtain the screen raster
in pure ASCII without control characters specific to a given
emulation.
StopCapture Procedure;
Stops the current capture and closes the file.
InitTake ('Character String') Procedure;
Initializes the character string that TWinTalk must search for
line by line. See the function Take.
Exit (code:Integer) Procedure;
Allows you to interrupt the running of a TWinTalk program. This
procedure should be used in case of error. If the parameter is
0, the program stops and the execution window remains on
the screen. If the parameter is different than 0, the execution
window is closed. This last possibility is above all used to
automatically close the window at the end of execution.
Transfer ('File Name') Procedure;
Begin the transfer of a given file using the current protocol.
The TWinPas program pauses until the end of the transfer.
Page 111
6.8 TWinTalk Functions.
Find('TargetString',abscissa,ordinate:Integer):Boolean;
Search for a given character string at a given screen position.
The result is true if the string is found, and otherwise false.
Connected:Boolean;
This function is true when the connection carrier signal is
detected and is otherwise false.
Taken:Boolean;
This function is true if the character string supplied by the
last InitTake had been found on the line, otherwise it is false.
6.9 TWinTalk constants
To preserve compatibility between emulations, TWinPas recognizes
several constants which characterize certain keyboard keys. It is
therefore entirely recommanded to use Return rather than Chr(13) or the
Videotex sequence corresponding to SEND, Escape rather than Chr(27).
Escape, Escape
Reurn, Return Carriage
Home, Home
End, End
Tab, Tab
Help, Help
Left,Right,Up,Down, cursor
Delete, Del
Back, BackSpace
Prior,Next, PgUP,PgDn
Add,Subtract,Decimal,Multiply, +,-,. and * of the numeric
keypad
F1 to F16, Function Keys
Num0 to Num9. digits on the numeric keypad
Page 112
6.10 Compilation Error Messages
When you execute a TWinPas program, TWinTalk will first read the file
to be executed, then analyze its contents to verify the syntax and
validity. If an error is detected, a small hat '^' is first placed under
the guilty symbol or expression. Then, one or more error messages are
also written at the end of the line. Finally, a summary of the different
errors is added to the end of the list with the number and the label of
the error.
Here is a complete list of the errors which can be detected.
0 "undef id", Undefined identifier.
1 "multi def", Identifier defined more than once in the
same call.
2 "identifier", An identifier is missing.
3 "program", Each program must begin with Program
4 ")", A right parenthesis is missing.
5 ":"' A colon is missing.
6 "syntax", Syntax error.
7 "ident,var", Error in the list of dummy parameters.
8 "Of", The symbol Of is missing.
9 "(", An left parenthesis is missing.
10 "id,array", A type must begin with an identifier,
the symbol Array, or the symbol Record.
11 "[", A left bracket is missing.
12 "]", A right bracket is missing.
13 ".."' The symbol ".." is missing.
14 ";", A semicolon is missing.
15 "func.type", The result of a function must be of the
type Integer, Char, or Boolean.
16 "=", An equal sign is missing. The symbol
":=" is used for assignment statements
and not for declarations.
17 "boolean", The expression following the symbols If,
While, and Until must be Boolean.
Page 113
18 "convar type", The control variable after For must be
of the type Integer, Char, or Boolean.
19 "type", The expressions which fix the values at
the beginning and at the end of a For
loop should be the same type as the
control variable.
20 "prog.param", The Output parameter should be present
in the program header.
21 "too big", The number is too big.
22 ".", A period is missing after the last End.
23 "type(case)", The Case selector should be of the type
Integer, Char, or Boolean. If Boolean,
an If instruction is recommanded
instead.
24 "const id", This character is not authorized here.
25 "const id", In the definition of a constant, the
equal sign "=" must be followed by a
constant. If an identifier is used, it
must also represent a constant.
26 "index type", The type of an index must be the same as
that of the declaration.
27 "index bound", In the declaration of a table, the lower
limit must not be larger than the upper
limit. The limits must stay within the
allowed interval + to -32767 and their
type must be the same.
28 "no array", Any indexed variable must be declared as
an Array.
29 "type id", A type identifier is missing.
30 "undef type", This type is not defined; Recursive type
definitions are not allowed.
31 "no record", Any variable having a field selector
must be declared as a Record.
32 "boole type", The operators Not, And, and Or must be
of the type Boolean.
33 "arith type", Illegal arithmetic expression.
34 "integer", The operands of Div and Mod are of
Integer type.
35 "types", The operands are of incompatible types.
Page 114
36 "param type", The types of the actual parameters and
the corresponding dummy parameters must
be identical.
37 "variable id", A variable is missing.
38 "string", A string must contain at least one
character.
39 "no.of.params", The number of actual and dummy
parameters must be the same.
40 "type", The Read parameters must be
Integer or Char.
41 "type", The Write parameters must be Integer,
Char, or constant string.
42 "real type", If the instruction is of the form
Write(x:m:n); then the type of x must be
Real.
43 "integer", If the expression is of the form
Write(x:n); or Write(x:m:n) then the
type of n must be Integer.
44 "var,const", No type nor procedure identifier can be
part of an expression.
45 "var,proc", An instruction may not begin with a type
or a function identifier. The only
exception is the assignment of a result
to a function. In this case, it must be
a part of the function block.
46 "types(:=)", In an assignment x:=y, the types of the
variable x and the expression y must be
identical.
47 "type(case)", All the operands of a Case statement
must be of the same type as the
selector.
48 "type", The type of the indicated function
argument is illegal.
49 "store overflow",The program is too large.
50 "constant", A constant may not begin with the
indicated symbol.
51 ":=", The symbol ":=" is missing (no space
between the ":" and the "=")
52 "Then", The symbol Then is missing.
53 "Until", The symbol Until is missing.
54 "Do", The symbol Do is missing.
Page 115
55 "to downto", The symbol To or DownTo is missing.
56 "begin", The symbol Begin is missing.
57 "end", The symbol End is missing.
58 "factor", A factor must begin with an identifier,
a constant, the symbol Not, or an open
parenthesis.
6.11 Interpreter Error Messages
"undefined case", One of the operands of a Case statement
has not been forseen.
"division by 0", The divisor of an expression is zero.
"invalid index", The index of a table is outside its
limits.
"stack overflow", The TWinPas stack is full.
"line too long", The input line is too long.
"aborted by user", The user has closed the window before
the end of the program.
"file error", File error.
"undefined error", Undefined error.
When one of these errors occurs, the program stops, the view window
reappears if it was hidden, and you may read the label of the error
message.
Page 116
Here is a real example of a TWinPas program used by the authors to make
a connection to a French BBS (Bulletin Board Service).
{l-} (* Suppress compiler listing *)
Program SuptelPro;
Const MAXTIM = 30; (* Constant definition *)
Var Try:Integer; (* Variable definitions *)
n:Integer;
Procedure WaitFor; (* String Wait Procedure *)
Var Times:Integer; (* Procedure local variable *)
Begin
Times:=0;
Repeat
Times:=Times+1 (* Loop counter *)
Wait(1); (* Wait 1 sec *)
Until Taken Or (Times>MAXTIM);
(* Test for error or found string *)
If Times>MAXTIM Then (*If MAXTIM is reached*)
Begin (* It is an error *)
WriteLn('String Not Found...');
Exit; (* Program Exit *)
End
End;
Procedure Suptel (* Procedure for Suptel Pro *)
Begin
InitTake('change?'); (* Target string *)
WaitFor; (* Wait for the string*)
Send(RETURN); (* Send <CR> *)
Wait(1); (* Wait 1 sec *)
Send(RETURN); (* Send <CR> *)
Page 117
InitTake('name?');
WaitFor;
Send('Firstname Name Password',RETURN);
InitTake('yes?');
Waitfor;
Send('n',RETURN);
End;
Procedure Valley; (* Procedure for Soft Valley *)
Begin
InitTake('=no?');
WaitFor;
Send(RETURN);
InitTake('name...?');
WaitFor;
Send('Firstname Name Password',RETURN);
InitTake('[NS]?');
WaitFor;
Send('n',RETURN,RETURN,RETURN);
End;
Begin (* Beginning of program *)
Cls; (* Clear the screen *)
Show; (* Show the window *)
n:=99; (* Set n to a large value *)
WriteLn('BBS Servers');
WriteLn;
WriteLn('0) Quit');
WriteLn('1) Suptel Pro'); (* Display a menu *)
WriteLn('2) Suptel 2');
WriteLn('3) Soft Valley');
WriteLn('4) Suptel 3');
Page 118
While(n>4) Or (n<0) Do (* Read the input line *)
ReadLn(n);
Hide; (* Hide the window *)
Connect; (* RS232 connection *)
(* The telephone numbers here are real, add "16,1" if
you are calling from outside the greater Parisien area*)
Case n Of
0: Exit(1); (*If n is zero, complete exit*)
1: Dial('48991200'); (* Dial a number *)
2: Dial('48980300'); (* corresponding to *)
3: Dial('64931382'); (* the value of n *)
4: Dial('48994300');
End;
Try := 0;
Repeat (* After dialing *)
Try := Try + 1; (* a number, wait for *)
Wait(1); (* the carrier signal *)
Until Connected Or (Try>3); (* for 3 seconds *)
If Try>3 Then (* If no carrier, error *)
Begin
WriteLn('No Carrier...');
Exit
End;
Case n Of
1,2,4:Suptel; (*Choose the correct procedure*)
3: Valley; (* based on the menu choice *)
End;
Exit(1); (* Exit + Close the window *)
End.
Page 119
Appendix: TWinTalk keyboard equivalents
The Windows environment in which TWinTalk functions makes great use of
the mouse. For users which to not have a pointing device, or to
accelerate certain commands, TWinTalk also offers a keyboard interface.
Menu Access.
In the standard Windows, access to the menus can be had by
simultaneously presing the ALT key and the key which represents the
underlined letter in the menu (Windows 2) or the first letter (Windows
1).
For example, to read a file, simultaneously press ALT and F to open the
File menu, then ALT plus R to choose the command Read.
To get to the system menu use ALT and the space key.
TWinTalk Shortcuts.
In certain cases a command should be able to be called very rapidly. The
method described above may prove to be tedious. To remedy this, TWinTalk
offers you key combinations which diectly invoke the commands. To:
- Call the Site_List, type Shift and F3 simultaneously
- Make a connection, Shift and F4
- Dial a number, Shift and F6
- Disconnect, Shift and F5
- Issue a 'Break', Shift and F7
- Change to Color mode Shift and F8
- Configure the V24 line Shift and F9
- Call the Help function Shift and F10
Page 120
The edit commands to know are standard Windows commands:
- Copy Shift and the Ins key
- Paste Ctrl and the Ins key
System functions.
- To change from one TWinTalk window to another, for example from
the file transfer window to the main emulation window, use ALT
and F6
- To Exit TWinTalk, use ALT and F4
Keys which displace the contents of a window
These keys act when the emulation window is too small to allow all the
emulated screen to be displayed.
- To scroll the contents of the emulation window one line up use
ALT and the DownArrow key.
- To scroll the contents of the emulation window one line down use
ALT and the UpArrow key.
- To see the hidden righthand part of an emulation window use
ALT and the RightArrow key.
- To see the hidden lefthand part of an emulation window use
ALT and the LeftArrow key.
- To see the lower hidden part of the emulation window use
ALT and PgDn.
- To see the upper hidden part of the emulation window use
ALT and PgUp.
Page 121
Area selection keys.
Even without a mouse it is possible to select an area of the
screen to copy, for example, data into the scrapbook.
- Ctrl Arrows move the mouse pointer.
- Ctrl Home returns the pointer to the upper left corner
of the emulation window.
- Ctrl End brings the pointer to the lower right corner of
the emulation window.
- Ctrl Space acts like the left button of the mouse.
To select an area, bring the pointer of the mouse to the
upper left corner of the area using the Ctrl Arrows, then
simultaneously press Ctrl and Space, and while keeping the
keys depressed, move the pointer to the lower right corner of
the area with the arrows.
Keys for various emulations.
For the VT102 and Ansi emulations, the correspondance is as
follows:
VT102 PC
PF1 to PF4 keys F1 to F4 keys.
VT102 keypad Keys 0 to 9 on the numeric keypad of
a 102 key keyboard or if Numlock is
is set on a 96 key keyboard.
Keypad .(period) Key . on the numeric keyboard of a
102 key keyboard or if Numlock is
set on a 96 key keyboard.
Keypad - (minus) - (minus) key
Keypad , (comma) + (plus) key
Keypad Enter * key or Shift+Return
Del <-- key
Back Space (BS) Shift + <-- key
ESC ESC
Directional arrows Identical
TAB TAB
Ctrl Ctrl
Return Return
Note: this key configuration is not applied unless the
keyboard configured box is not checked in the Setup BT/ANSI
dialog area. If the box is checked, the keys defined by the
user will be used instead.
(Preliminary release for TWinTalk 2.0 - USA Demo version)
end of document